package com.example.spring_mysql.stp

import cn.dev33.satoken.stp.StpUtil
import cn.dev33.satoken.thymeleaf.dialect.SaTokenDialect
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.thymeleaf.spring6.view.ThymeleafViewResolver


@Configuration
class SaTokenConfigure {
    @Bean
    fun getSaTokenDialect(): SaTokenDialect  {
        return SaTokenDialect ()
    }

//    @Autowired
//    private fun configureThymeleafStaticVars(viewResolver: ThymeleafViewResolver) {
//        viewResolver.addStaticVariable("stp", StpUtil.stpLogic)
//    }
}

